//package com.yuxi.config;
//
//import org.I0Itec.zkclient.ZkClient;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.EnvironmentAware;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.PropertySource;
//import org.springframework.core.env.Environment;
//
///**
// *   zookeeper 配置
// *   Created by yuxi on 16/11/19.
// */
//@Configuration
//@PropertySource("classpath:application.properties")
//public class ZkClientConfig implements EnvironmentAware {
//
//    private Environment env;
//    @Override
//    public void setEnvironment(Environment environment) {
//        this.env=environment;
//    }
//    @Autowired
//    private ZkClient zk = new ZkClient(env.getProperty("zookeeper.host"));
//
//    @Bean
//    public ZkClient getClient() {
//        String host = env.getProperty("zookeeper.host");
//        System.out.println(host);
//        zk = new ZkClient(host);
//        return zk;
//    }
//}
